import { ResponseData } from './public'
import { UserState } from '@/store/modules/user'

// 登录接口约束
export interface LoginSuccess extends ResponseData {
  Data: string
}

// 用户信息接口约束
export interface UserInfo extends ResponseData {
  info: UserState
}

// 路由对象约束
export interface RouterObj {
  Id: number,
  LinkUrl: string,
  Name: string,
  Key: string,
  Redirect?: string,
  Component?: string,
  Children?:RouterObj[],
  Icon?: string,
  ParentId?: number,
  Hidden?: boolean,
  KeepAlive?: boolean
}

// 路由数组约束
export type RouterTable = RouterObj[]

// 路由接口约束
export interface RouterData extends ResponseData {
  Data: RouterTable
}

